]> dgit.raspbian.org Git - gnome-shell.git/commit
windowPreview: Cache the boundingBox of the layout manager
authorJonas Dreßler <verdre@v0yd.nl>
Mon, 1 Feb 2021 10:51:27 +0000 (11:51 +0100)
committerMarge Bot <marge-bot@gnome.org>
Mon, 1 Feb 2021 13:12:43 +0000 (13:12 +0000)
commit959639bdc9ba75bf3d85c7827f4519df957c99f2
tree09ed0a8624fb8b081e38c15245f420a46c6e89f5
parenta4bf44734d8e8f5e3efc852db794bf6bfbc2c918
windowPreview: Cache the boundingBox of the layout manager

Accessing GObject properties from JS has proven to be quite slow because
of the JS->C->JS roundtrip involved. With the WindowPreview this
actually has an impact since we're accessing those properties very often
while creating new layouts.

So cache the boundingBox and the windowCenter properties of the
WindowPreview using a this._cachedBoundingBox JS object. This might
speed up opening the overview with lots of open windows significantly.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1617>
js/ui/windowPreview.js